<?php
set_time_limit(0);
require_once '../system/common.inc.php';
require_once '../system/class/getid3/getid3.php';
if($uid){
	$url = $_GET['downurl'];
	$fid = explode('/',$url);
	$fid = end($fid);
	DB::insert('songs', array(
		'uid' => $uid,
		'title' => '待填写',
		'artist' => '待填写',
		'album' => '待填写',
		'status' => '1',
		'type' => '0',
		'fileserver_type' => 'vdisk',
		'fileserver_data' => $fid,
	));
	unlink($targetFile);
	echo "<script>alert('上传成功！');opener.location.href='/my.php';window.close();</script>";
}else exit("Access Denied");
?>